package com.example.test.enums;

/**
 * @author decent
 */

public enum ExceptionEnum {
    /**
     * 订单添加异常
     */
    INSERT_ORDER_ERROR(3000, "订单添加异常"),

    /**
     * 更新库存异常
     */
    STOCK_UPDATE_ERROR(3001,"更新库存异常"),

    /**
     * 添加卡券异常
     */
    INSERT_CARD_ERROR(3002,"添加卡券异常"),

    /**
     * 订单请求失败
     */
    ORDER_REQUEST_ERROR(3003,"订单请求失败");

    private final Integer code;

    private final String message;

    ExceptionEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
